In computer networks, a number of network stations are typically interconnected via a communications medium. For example, Ethernet is a commonly used local area network (LAN) scheme in which multiple stations are connected to a shared or dedicated serial data path. These stations often communicate with a switch or some other network device located between the data path and the stations connected to that path. The switch typically controls the communication of data and includes logic for receiving and forwarding data frames to their appropriate destinations.
In an Ethernet network operating in accordance with IEEE 802.1Q, every frame coming into a switch or bridge must be assigned to a virtual local area network (VLAN). If the frame arrives with no explicit VLAN tag, the frame is assigned to a default VLAN that is associated with the port on which the frame was received.
The IEEE 802.1Q protocol also includes a number of rules defining when data frames transmitted from a switch or bridge must include VLAN tags and when they must not. For any given VLAN, each port of the switch or bridge is either a member of the untagged set for that VLAN or it is not a member of the untagged set. If the port is a member of the untagged set, all frames that belong to the given VLAN and are forwarded from that port must be transmitted without a VLAN tag.
A port that is a member of the untagged set for one VLAN, however, can at the same time be omitted from the untagged set for another VLAN. This means that a port may have to remove VLAN tags from frames belonging to one VLAN and add VLAN tags to frames belonging to another VLAN.
In an Ethernet network operating in accordance with IEEE 802.1D, switches must ignore VLANs. That is, data frames must be forwarded exactly the way they were received. If a frame arrives with a VLAN tag, it must be forwarded with a VLAN tag. Similarly, if a frame arrives without a VLAN tag, it must be forwarded without a VLAN tag.
Due to these conflicting rules, a switch operating in accordance with the IEEE 802.1Q protocol is not compatible with the IEEE 802.1D protocol and vice versa. For example, if a switch operating according to IEEE 802.1Q has all its ports programmed to be members of the untagged set for all VLANs, then all VLAN tags will be removed from received frames before they are forwarded. This is inconsistent with the IEEE 802.1D protocol in which a data frame must be forwarded exactly as it is received.